﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Tong;
public partial class Menu_Menu_Del : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        TongUse TextData = new TongUse();
        int id=0;
        try
        {
             id = int.Parse(Request.QueryString["id"].ToString());
        }
        catch (Exception ex)//对错误码的处理
        {
            TextData.Err("此页面不能直接访问   <a href = " + Request.RawUrl.ToString() + ">" + ex.Message + " 返回</a>");
        }

         if (id != 0)
         {

             TextData.SqlDataSave("delete   [TreeClass] where id =" + id);//删除记录
             TextData.SqlDataSave("delete   [TreeClass] where followid =" + id);//删除子目录下所有记录
             TextData.Res.Response.Redirect("Menu_Show.aspx");//转到请原始请示页

         }
         else
         {
             TextData.Err("   <a href = " + Request.RawUrl.ToString() + ">末知道错误 返回</a>");
         }
        

        
        
        

    }
}
